package com.best4cloud.auth.service.feign;

import com.best4cloud.auth.security.User;
import com.best4cloud.auth.service.feign.fallback.UserFeignClientFallback;
import com.best4cloud.common.core.constant.ServiceConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = ServiceConstant.USER, fallback = UserFeignClientFallback.class)
public interface UserFeignClient {

    @RequestMapping(value = "/auth/loadUserByUsername", method = RequestMethod.GET)
    User loadUserByUsername(@RequestParam("username") String username);

}
